//
//  NormalTest.m
//  EFExtend
//
//  Created by mac on 15/6/29.
//  Copyright (c) 2015年 Eric. All rights reserved.
//

#import "NormalTest.h"


@interface NormalTest ()

@end

@implementation NormalTest

- (void)dealloc
{
   
    HM_SUPER_DEALLOC();
}

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view.
    
    [self.customNavLeftBtn setImage:[UIImage imageNamed:@"back.png"] forState:UIControlStateNormal];
    [self.customNavLeftBtn setFrame:CGRectMakeBound(32, 32)];
    
    
    UIImage *img =  [UIImage imageNamed:@"nav_bg_iphone5.png"];
    CGRect r = CGRectMake(10,10, img.size.width-200, img.size.height-30);
    UIBezierPath * path = [UIBezierPath bezierPathWithRect:r];
    UIImage *imgs = [img cropWithPath:path.CGPath EOC:YES];
    [[[[[UIView viewAsImage] EFContentMode:UIViewContentModeTop] EFImage:img] EFFrame:CGRectMake(0, 0, 100, 200)] EFOwner:self.view];
    [[[[[UIView viewAsImage] EFContentMode:UIViewContentModeTop] EFImage:imgs] EFFrame:CGRectMake(0, 300, 100, 200)] EFOwner:self.view];
    
}


- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

ON_Button(signal){
    UIButten *btn = signal.source;
    if ([signal is:[UIButten TOUCH_UP_INSIDE]]) {
        if ([btn is:@"leftBtn"]) {//customNavLeftBtn
            [self backAndRemoveWithAnimate:YES];
        }else if ([btn is:@"rightBtn"]){//customNavRightBtn
            
        }
    }
}

@end
